1. Field of the Invention
The present invention relates to a method for packet communication where a node moves between different networks, and particularly to a method for packet communication where a node is moved to networks having a network address translation (NAT) function.
2. Description of the Related Art
In Internet Protocol (IP) communication, a wide area network is divided into a plurality of sub-networks (local area network) for management. Further, each node (node) is assigned an IP address, which includes a network portion indicating a number for identifying a sub-network and a host portion for indicating a reference number of a node in the sub-network.
In IP communication, routing is performed by including the IP address as a sender address and a destination address. For example, a router provided in each sub-network receives a packet existed on an IP network and checks whether a network portion of the destination address matches with a sub-network number managed by itself. If they match, the router incorporates the packet to the its managing sub-network. Each node selects and receives a packet whose destination address matches with its IP address among packets incorporated to the sub-network. It should be noted that the router might be called gateway in software terms.
Due to the above-described configuration of the IP network, a node to which an IP address is assigned within a particular sub-network cannot receive packets addressed to itself when the node is moved to another sub-network. It is because the router managing the sub-network to which the node is moved does not incorporate packets addressed to the node to its managing network.
Thus, in order to solve such a problem, a mobile IP (RFC2002, “IP Mobility Support”, RFC: Request For Comment) has been proposed. The mobile IP is proposed by Internet Engineering Task Force (IETF). It is a technology for transferring an IP packet to a node without changing the IP address assigned to the node even when the node is moved across different sub-networks.
FIG. 1 is a construction diagram exemplifying a network concept of the mobile IP. FIG. 1 includes a mobile node(MN) 10, a home network 20 which is sub-network to which the mobile node 10 originally belongs, a home agent unit (HA) 16 for managing movements of the mobile node 10, a router 14 having the HA 16, a foreign network 21 which is a sub-network to which the mobile node 10 moves, a foreign agent unit (FA) 17 for managing the mobile node 10 which is moved into the foreign network 21, a router 15 having the FA 17, a correspondent node (CN) 11 for communicating with the mobile node 10, and an IP network 22 such as Internet connected to the home network 20 and the foreign network 21.
A processing procedure of the mobile IP will be described by using as an example a case where the mobile node 10 is moved to the foreign network 21. An IP address is preset in the mobile node 10 in hardware or software manner. The IP address of the mobile node 10 includes an identification number of the home network 20 as a network portion and includes an identification number of the mobile node 10 in the home network 20 as a host portion.
Now, it is assumed that a packet addressed to the mobile node 10 is sent from the correspondent node 11 onto the IP network 22. The destination address of the packet, that is, the IP address of the mobile node 10 includes the identification number of the home network 20. Thus, the packet is incorporated to the router 14 managing the home network 20 via a path 23. The HA 16 having the router 14 recognizes in advance that the mobile node 10 has been moved to the foreign network 21 and transfers the packet to the router 15 managing the foreign network 21. The FA 17 having the router 15 incorporates the transferred packet to its managing sub-network, that is, the foreign network 21. The mobile node 10 receives the packet incorporated to the foreign network 21 and determines that the destination address matches with its address in order to receive the packet.
It should be noted that a tunneling technology is used for transferring packets from the HA 16 to the FA 17 via path 24. The tunneling technology adds a header including a new destination address and a transferring address to a packet when transferring. The processing that a transferring node adds the header is called encapsulation processing while the processing that a destination node removes the header is called decapsulating processing. In this case where a packet is transferred from the HA 16 to the FA 17, an IP address D, as a transferring address, of the router 15 having the FA 17 and IP address C, as a destination address, of the router 14 having the HA 16 are added as a header.
It will be described a case where the mobile node 10 exists in the foreign network 21 and sends a packet to the correspondent node 11. The mobile node 10 creates a packet including an IP address B of the correspondent node 11 and its IP address (that is, home address A) as the destination and sender addresses, respectively. The created packet is sent to the correspondent node 11 via the path 26, the router 15, and the path 27.
FIG. 2 is a sequence diagram for exemplifying a processing sequence of a mobile IP in a case where the mobile node 10 is moved from the home network 20 to the foreign network 21. In FIG. 2, 1000 to 1002 are processing where the mobile node 10 exists in the home network 20 while 1003 to 1015 are processing where the mobile node 10 exists in the foreign network 21.
First of all, the mobile node 10 in the home network 20 receives an agent advertisement from the router 14 so that it recognizes that a sub-network where it is positioned is managed by the HA 16 of the router 14 (processes 1000 to 1002). FIG. 3 is an explanatory diagram for exemplifying a format of the agent advertisement. As shown, the agent advertisement includes an IP address (Care of Address) of an agent node (that is, a node having the HA and FA) managing the sub-network. It should be noted that the agent advertisement is a packet in which a router discovery of an Internet control message protocol (ICMP) is extended and broadcasted in the sub-network.
Next, the mobile node 10 is moved from the home network 20 into the foreign network 21 (process 1003). In the foreign network 21, the mobile node 10 receives an agent advertisement from the router 15 and recognizes that it is moved into the sub-network managed by the FA 17 of the router 15 (process 1004). Then, the mobile node 10 requests the FA 17 of the router 15 to register its presence (process 1005). More specifically, a message in a format shown in FIG. 4 is sent as a registration request message to the router 15. As shown in FIG. 4, the registration request message includes a home address of the mobile node 10, an address of a home agent managing the mobile node 10 (IP address of the router 14, here), and an address of a foreign agent (Care of address, IP address of the router 15, here).
The FA 17 receives the registration request message shown in FIG. 4 from the mobile node 10 and registers (stores) its content. Then, the FA 17 transfers the registration request message to the HA 16 (process 1006). The HA 16 receives the registration request message and registers (stores) its registration content so that packet communication can be performed in the foreign network 21 as well. Further, the HA 16 responds to the FA 17 that registration has been completed (process 1007). More specifically, the FA 17 sends a message in a format shown in FIG. 5 as a response message to the router 15. As shown in FIG. 5, the message includes a home address of the mobile node 10 and an IP address of the home agent (IP address of the router 14, here) FA 17 receives the response message and sends the response message to the mobile node 10. The mobile node 10 receives the response message so that it can recognizes that communication is possible (process 1008).
Next, a method for communication between the mobile node 10 and the correspondent node 11 will be described with reference to FIGS. 1 and 2. The mobile node 10 creates packet data whose destination address is an IP address B of the correspondent node 11 and whose sender address is its IP address A. Then, the mobile node 10 sends the packet into the foreign network 21 (process 1009). The packet is sent to the correspondent node 11 on the IP network 22 through the router 15 (process 1010). When the correspondent node 11 responds to the received packet, that is, when the correspondent node 11 responds to the mobile node 10, the correspondent node 11 sends to the IP address B a packet whose destination address is the address A which is a destination address of the received packet and whose sender address is its IP address B (process 1011).
The packet sent in this manner includes an identification number of the home network 20 in the network portion of its destination address A. Thus, it is incorporated to the router 14 once. The home agent 16 of the router 14 has already realized that the mobile node 10 was moved to the foreign network 21. The home agent 16 encapsulates the received packet and tunneling-transfers it to the router 15 (processes 1012 and 1213). More specifically, the home agent 16 adds to the packet a new packet whose destination address is an IP address D of the router 15 and whose sender address is an IP address C of the router 14 and sends out the packet to the IP network 22. The router 15 receives the tunnel-transferred and encapsulated packet and decapsulates the packet (process 1014). It should be noted that the destination and sender addresses of the packet resulted from the decapsulation are the same as those before encapsulation, and they are the IP address A of the mobile node 10 and the IP address B of the correspondent node 11, respectively. The decapsulated packet are sent from the router 15 into the foreign network 21 and received by the mobile node 10 (process 1015). In this way, the communication is possible between the mobile node 10 in the foreign network 21 and the correspondent node 11 on the IP network.
Recently, since IP address resources must be used efficiently, a private network has been established which uses technologies including private addresses, NAT, and IP masquerades in enterprises.
It should be noted that when an address used within a particular network is a global address, a private address is an address used only in a particular sub-network belonging to the global network. Further, NAT translates a destination address and a sender address of each packet from a private address to a global address, or from a global address to a private address when packet communication is performed between node using the private address and node using the global address. In NAT, the private address and the global address are mapped one-to-one.
The IP masquerade is resulted from the extension of the NAT. The IP masquerade is a technology for mapping a plurality of private addresses to one global address by regarding one including a port number of TCP (transmission control) and/or UDP (user datagram protocol) as an address. A network using a private address and a network using a global address are called a private network and a global network, respectively, below.